package com.tis.database.entitys.staging;

import java.io.Serializable;

import javax.persistence.*;

import org.apache.commons.lang.builder.ToStringBuilder;

import promis.utility.CommonService;

import com.tis.database.dao.ClsInstance;

import java.util.Date;


/**
 * 
 * @author Chatree Siangklom of Administrator
 * Date =Oct 18, 2013 : 3:25:13 PM 
 * CreateBy=Chatree Siangklom
 * 
 * ApplicationLoging
 * TODO
 */
@Entity
@Table(name=ClsInstance.INTERFACE_SCHEMA + ClsInstance.POINTER + "APPLICATION_LOGING")
@NamedQueries({
	@NamedQuery(name=ApplicationLoging.findAll, query="FROM ApplicationLoging c order by c.id asc "),
	@NamedQuery(name=ApplicationLoging.findBySearch, query="FROM ApplicationLoging c Where 1 = 1 ")	
})
public class ApplicationLoging implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static final String findAll = "ApplicationLoging_findAll";
	public static final String findBySearch = "ApplicationLoging_findBySearch";

	@Override
	public String toString()
	{ 
		return ToStringBuilder.reflectionToString(this);
	}
	
	/**	 
	 * Date =Oct 18, 2013 : 4:10:14 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging
	 * TODO
	 */
	public ApplicationLoging() {
	}
	
	/**
	 * Date =Oct 18, 2013 : 4:09:27 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging
	 * TODO
	 * @param id
	 * @param instanceNo
	 * @param msgAltDesc
	 * @param msgCode
	 * @param msgDesc
	 * @param refInstanceNo
	 */
	public ApplicationLoging(String instanceNo, String msgCode, String msgDesc, String msgAltDesc, String refInstanceNo) {
		this.instanceNo = instanceNo;
		this.msgAltDesc = msgAltDesc;
		this.msgCode = msgCode;
		this.msgDesc = msgDesc;
		this.refInstanceNo = refInstanceNo;
	}

	@Id
	@Column(name="APPLICATION_LOGING_ID")
	private String id;

	private String createdby;

	@Temporal(TemporalType.TIMESTAMP)
	private Date createdon;

	@Column(name="INSTANCE_NO")
	private String instanceNo;

	@Column(name="MSG_ALT_DESC")
	private String msgAltDesc;

	@Column(name="MSG_CODE")
	private String msgCode;

	@Column(name="MSG_DESC")
	private String msgDesc;

	@Column(name="REF_INSTANCE_NO")
	private String refInstanceNo;

	private String updatedby;

	@Temporal(TemporalType.TIMESTAMP)
	private Date updatedon;
	
	@Column(name="URI")
	private String uri;
	
	@Column(name="HOST_NAME")
	private String hostName;
	
	
	public String getCreatedOnToString() {
		return CommonService.ConvertDateTimeToStringDisplay(this.createdon);
	}
	
	public String getUpdatedOnToString() {
		return CommonService.ConvertDateTimeToStringDisplay(this.updatedon);
	}

	/**
	 * @return the hostName
	 * Date =Oct 24, 2013 : 10:59:15 AM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getHostName() {
		return hostName;
	}

	/**
	 * @param hostName the hostName to set
	 * Date =Oct 24, 2013 : 10:59:15 AM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	/**
	 * @return the uri
	 * Date =Oct 18, 2013 : 5:09:37 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getUri() {
		return uri;
	}

	/**
	 * @param uri the uri to set
	 * Date =Oct 18, 2013 : 5:09:37 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setUri(String uri) {
		this.uri = uri;
	}

	/**
	 * @return the id
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the createdby
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getCreatedby() {
		return createdby;
	}

	/**
	 * @param createdby the createdby to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setCreatedby(String createdby) {
		this.createdby = createdby;
	}

	/**
	 * @return the createdon
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java Date
	 * TODO
	 */
	public Date getCreatedon() {
		return createdon;
	}

	/**
	 * @param createdon the createdon to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java Date
	 * TODO
	 */
	public void setCreatedon(Date createdon) {
		this.createdon = createdon;
	}

	/**
	 * @return the instanceNo
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getInstanceNo() {
		return instanceNo;
	}

	/**
	 * @param instanceNo the instanceNo to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setInstanceNo(String instanceNo) {
		this.instanceNo = instanceNo;
	}

	/**
	 * @return the msgAltDesc
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getMsgAltDesc() {
		return msgAltDesc;
	}

	/**
	 * @param msgAltDesc the msgAltDesc to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setMsgAltDesc(String msgAltDesc) {
		this.msgAltDesc = msgAltDesc;
	}

	/**
	 * @return the msgCode
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getMsgCode() {
		return msgCode;
	}

	/**
	 * @param msgCode the msgCode to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setMsgCode(String msgCode) {
		this.msgCode = msgCode;
	}

	/**
	 * @return the msgDesc
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getMsgDesc() {
		return msgDesc;
	}

	/**
	 * @param msgDesc the msgDesc to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setMsgDesc(String msgDesc) {
		this.msgDesc = msgDesc;
	}

	/**
	 * @return the refInstanceNo
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getRefInstanceNo() {
		return refInstanceNo;
	}

	/**
	 * @param refInstanceNo the refInstanceNo to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setRefInstanceNo(String refInstanceNo) {
		this.refInstanceNo = refInstanceNo;
	}

	/**
	 * @return the updatedby
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java String
	 * TODO
	 */
	public String getUpdatedby() {
		return updatedby;
	}

	/**
	 * @param updatedby the updatedby to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java String
	 * TODO
	 */
	public void setUpdatedby(String updatedby) {
		this.updatedby = updatedby;
	}

	/**
	 * @return the updatedon
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging.java Date
	 * TODO
	 */
	public Date getUpdatedon() {
		return updatedon;
	}

	/**
	 * @param updatedon the updatedon to set
	 * Date =Oct 18, 2013 : 3:46:30 PM 
	 * CreateBy=Chatree Siangklom
	 *  ApplicationLoging.java Date
	 * TODO
	 */
	public void setUpdatedon(Date updatedon) {
		this.updatedon = updatedon;
	}

	/**
	 * Date =Nov 6, 2013 : 1:35:05 PM 
	 * CreateBy=Chatree Siangklom
	 * ApplicationLoging
	 * TODO
	 * @param id
	 * @param createdby
	 * @param createdon
	 * @param instanceNo
	 * @param msgAltDesc
	 * @param msgCode
	 * @param msgDesc
	 * @param refInstanceNo
	 * @param updatedby
	 * @param updatedon
	 * @param uri
	 * @param hostName
	 */
	public ApplicationLoging(String id, String createdby, Date createdon,
			String instanceNo, String msgAltDesc, String msgCode,
			String msgDesc, String refInstanceNo, String updatedby,
			Date updatedon, String uri, String hostName) {
		this.id = id;
		this.createdby = createdby;
		this.createdon = createdon;
		this.instanceNo = instanceNo;
		this.msgAltDesc = msgAltDesc;
		this.msgCode = msgCode;
		this.msgDesc = msgDesc;
		this.refInstanceNo = refInstanceNo;
		this.updatedby = updatedby;
		this.updatedon = updatedon;
		this.uri = uri;
		this.hostName = hostName;
	}
	
	
}